<?php

//UMA new
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateInputItems extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('input_items', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('input_item', 255)->unique()->comment('質問項目和名');
            $table->string('identifier', 50)->unique()->comment('質問項目英名');
            //$table->string('input_type', 32)->comment('入力タイプ');
            $table->unsignedBigInteger('input_group_id')->comment('大項目名');
            $table->timestamps();
            $table->foreign('input_group_id')->references('id')->on('input_groups');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('input_items');
    }
}
